|
RtGetBusDataByOffset, RtTranslateBusAddress, and RtSetBusDataByOffset facilitate the development of RTSS hardware drivers. Each function eases the gathering of specific hardware information and/or setting hardware.
RtGetBusDataByOffset is used primarily in support of attaching a driver to a hardware device by obtaining device information required for input to RtAttachInterruptVector, such as the bus number, interrupt level, and interrupt vector. For example, by issuing a call to RtGetBusDataByOffset, a PCI bus can be scanned, detect a particular device, and then return the bus number where the device resides, the bus interrupt level, and interrupt vector.
For further information, see RtAttachInterruptVector and RtAttachInterruptVectorEx in the Reference Guide.
Setting hardware is accomplished with a call to RtSetBusDataByOffset. This function is useful when device initialization requires clearing or setting of status registers, slot, and so on.
RtTranslateBusAddress is used to translate a device-specific memory address range into the logical address space of a driver.
See the Bus I/O Programming Example in the RTX Example Reference. The code fragment illustrates each of the Bus I/O calls in a PCI driver.